unit Main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,EncdDecd;

type
  TFormMain = class(TForm)
    EditText: TEdit;
    Button1: TButton;
    Button2: TButton;
    MemoMsg: TMemo;
    Button3: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormMain: TFormMain;

implementation
uses des;

{$R *.dfm}

procedure TFormMain.Button1Click(Sender: TObject);
var
  sText : string;
begin
  sText := Trim(EditText.Text);
  MemoMsg.Lines.Add(sText);
  sText := EncryDes(sText,'_fly2ky_','12345678');
  MemoMsg.Lines.Add(sText);
  sText:=EncodeString(sText);
  MemoMsg.Lines.Add(sText);

end;

procedure TFormMain.Button3Click(Sender: TObject);
var
  sText : string;
begin
  sText := Trim(EditText.Text);
  sText := EncodeString(sText);
  MemoMsg.Lines.Add(sText);

  sText := DecodeString(sText);
  MemoMsg.Lines.Add(sText);
end;

end.
